/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uk.ac.cam.ccn.sac.modules.audio;

import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JDialog;

/**
 *
 * @author Thomas
 */
public class AudioDialog extends JDialog{
    private boolean isStreaming=false;
    public AudioDialog(){
        super((Frame)null, "Choose audio mode", true);
        JButton btnStreaming = new JButton("Streaming");
        btnStreaming.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                isStreaming=true;
                dispose();
            }
        });
        
        JButton btnPush = new JButton("Push");
        btnPush.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                isStreaming=false;
                dispose();
            }
        });
        this.getContentPane().add(btnStreaming, BorderLayout.WEST);
        this.getContentPane().add(btnPush, BorderLayout.EAST);
        pack();
        this.setResizable(false);
        this.setVisible(true);
    }
    
    public boolean isStreamingMode(){
        return isStreaming;
    }
}
